﻿/// <reference name="MicrosoftAjax.js"/>
/// <reference path="aaagctrl.js" />
/// <reference path="SBT.Debug.js" />

ButtonsManager = function(host)
{
    ButtonsManager.initializeBase(this, [ host ]);
}

ButtonsManager.prototype = 
{
     onSilverlightLoaded:function( slControl, args)
    {
        var plugin = this.get_plugin();
        var pluginContent = plugin.content;
        var buttonOk = $create(SBT.Button, {plugin:plugin, 
                    element:pluginContent.findName("buttonOk")},
                    {click:Function.createDelegate(this,this.onOk)},null,null);
        var buttonCancel = $create(SBT.Button, {plugin:plugin, 
                    element:pluginContent.findName("buttonCancel")}, 
                    {click:Function.createDelegate(this, this.onCancel)},null,null);
        
    },
    onOk : function(sender, args)
    {
        alert("Ok !");
    },
    onCancel:function(sender,args)
    {
        alert("Cancel !");
    }
}

ButtonsManager.registerClass("ButtonsManager", SBT.SLManager);